<link href="__plugins_url__swfupload/css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__plugins_url__swfupload/swf/swfupload.js"></script>
<script type="text/javascript" src="__plugins_url__swfupload/script/js/swfupload.queue.js"></script>
<script type="text/javascript" src="__plugins_url__swfupload/script/js/fileprogress.js"></script>
<script type="text/javascript" src="__plugins_url__swfupload/script/js/handlers.js"></script>
<script type="text/javascript">
	var bx_swf_uploader;

    if ('__ajx_mode__' == 'true') {
        bxInitSwfUploader();
    } else {
        addEvent( window, 'load', function() { bxInitSwfUploader() } );
    }

	/*window.onload = function()*/
    function bxInitSwfUploader() {

		bx_swf_uploader = new SWFUpload({
			// Backend Settings
			upload_url: "__accept_file__",
			post_params : {"action": "accept_multi_files", "oid": "__owner_id__" __possible_album__ },

			// File Upload Settings
			file_size_limit : "__file_size_limit__",
			file_types : "__accept_format__",
			file_types_description : "__accept_format_desc__",
			file_upload_limit : "__file_upload_limit__",
			file_queue_limit : "__file_queue_limit__",

			// Event Handler Settings (all my handlers are in the Handler.js file)
			file_dialog_start_handler : fileDialogStart,
			file_queued_handler : fileQueued,
			file_queue_error_handler : fileQueueError,
			file_dialog_complete_handler : fileDialogComplete,
			upload_start_handler : uploadStart,
			upload_progress_handler : uploadProgress,
			upload_error_handler : uploadError,
			upload_success_handler : uploadSuccess,
			upload_complete_handler : uploadComplete,

			// Button Settings
			button_window_mode: "__button_wmode__",
			button_image_url : "__button_image_url__",
			button_placeholder_id : "spanButtonPlaceholder",
			button_width: 75,
			button_height: 25,
            button_text_top_padding : 4, 
            button_text : "<span class=\"swf_center\">__Upload_lbl__</span>",
            button_text_style : ".swf_center { text-align:center;font-family:Verdana,Arial;color:#333;font-size:11px; }", 
			
			// Flash Settings
			flash_url : "__plugins_url__swfupload/swf/swfupload.swf",
/*
			swfupload_element_id : "flashUI2",		// Setting from graceful degradation plugin
			degraded_element_id : "degradedUI2",	// Setting from graceful degradation plugin
*/
			custom_settings : {
				progressTarget : "fsUploadProgress",
				cancelButtonId : "btnCancel"
			},

			// Debug Settings
			debug: false
		});
	 }
</script>

<div id="content">
	<form id="form1" action="__accept_file__" method="post" enctype="multipart/form-data" style="margin-bottom:10px;">
		<div>
			<div class="fieldset flash" id="fsUploadProgress"></div>
			<div>
				<span id="spanButtonPlaceholder"></span>
				<div class="button_wrapper">
                    <input id="btnCancel" type="button" value="<bx_text:_Cancel_Uploads />" onclick="cancelQueue(bx_swf_uploader);" disabled="disabled" class="form_input_submit" />
					<div class="button_wrapper_close"></div>
				</div>
			</div>
		</div>
	</form>
    <div class="swf_uploader_warning"><bx_text:_media_flash_warning /></div>
    <div id="accepted_files_block" style="width: 800px; background-color:#FFDADA;"></div>
</div>
